﻿using System;

using XEvent.Events.Base;

namespace XEvent.Events
{
    public class WindowEvent : PubSubEvent<WindowEvent>
    {
        public WindowEvent()
        {
            Type = EventType.Action;
        }

        public object Data { get; set; }

        public Delegate CallBack { get; set; }

        public EventType Type { get; set; }

        public WindowActionType WindowActionType { get; set; }

        public int EventId { get; set; } = 0;
    }

    public enum EventType
    {
        /// <summary>
        /// 错误信息
        /// </summary>
        Error = 0,
        /// <summary>
        /// 操作信息
        /// </summary>
        Action = 1,
        /// <summary>
        /// 调试信息
        /// </summary>
        Debug = 2,
        /// <summary>
        /// 跟踪信息
        /// </summary>
        Trace = 3,
        /// <summary>
        /// 状态信息
        /// </summary>
        Status = 4,
        /// <summary>
        /// 驱动器故障信息
        /// </summary>
        Fault = 5
    }

    public enum WindowActionType
    {
        /// <summary>
        /// 
        /// </summary>
        Open,

        /// <summary>
        /// 
        /// </summary>
        Close,

        /// <summary>
        /// 
        /// </summary>
        Hidden,

        /// <summary>
        /// 
        /// </summary>
        OK,

        /// <summary>
        /// 
        /// </summary>
        Edit,

        /// <summary>
        /// 创建数据项
        /// </summary>
        Create,

        /// <summary>
        /// 保存文件提示框，全局通用
        /// </summary>
        SaveFile,

        /// <summary>
        /// 选取文件路径提示框，全局通用
        /// </summary>
        SelectFilePath,

        /// <summary>
        /// 模块重命名
        /// </summary>
        RenameModule,

        /// <summary>
        /// 更新
        /// </summary>
        Update,
    }
}
